From: Ximin Luo Date: Tue, 25 Jul 2017 12:47:33 +0000 (+0200) Subject: Update packaging for 0.20.0, ./configure is gone X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~184 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=be6975afd0100c02e3c3707c9b0501c612f5fbe7;p=cargo.git Update packaging for 0.20.0, ./configure is gone --- diff --git a/debian/TODO.Debian b/debian/TODO.Debian index e42015090..1691d98ab 100644 --- a/debian/TODO.Debian +++ b/debian/TODO.Debian @@ -1,3 +1,10 @@ - transition libgit to 0.25 - write better explanation for the libdbghelp.a stuff - work around https://github.com/rust-lang/rust/issues/43449 + +Later +===== + +A lot of stuff here is shared with dh-cargo. We should use that instead. + +Specifically, d/cargohome/config and the override_dh_auto_* rules diff --git a/debian/cargohome/config b/debian/cargohome/config index 0cbcdfa27..db4947ee3 100644 --- a/debian/cargohome/config +++ b/debian/cargohome/config @@ -3,3 +3,6 @@ replace-with = "dh-cargo-registry" [source.dh-cargo-registry] directory = "../vendor" + +[build] +rustflags = "-g" diff --git a/debian/changelog b/debian/changelog index 86f32eb19..1e71bbfbe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -cargo (0.17.0-3) UNRELEASED; urgency=medium +cargo (0.20.0-1) UNRELEASED; urgency=medium + * New upstream release. * Fix cross-compiling declarations, Multi-Arch: foreign => allowed + * Un-embed libgit2 0.25.1 again. - -- Ximin Luo Wed, 21 Jun 2017 15:30:28 +0200 + -- Ximin Luo Tue, 25 Jul 2017 14:46:16 +0200 cargo (0.17.0-2) unstable; urgency=medium diff --git a/debian/install b/debian/install index 524567504..a1ad6e4ff 100644 --- a/debian/install +++ b/debian/install @@ -1,2 +1,2 @@ -target/*/release/cargo usr/bin +target/release/cargo usr/bin debian/scripts/* usr/share/cargo diff --git a/debian/rules b/debian/rules index c1ef37d44..ec8da18a5 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,8 @@ RUSTFLAGS += -C linker=$(DEB_HOST_GNU_TYPE)-gcc RUSTFLAGS += $(foreach flag,$(LDFLAGS),-C link-arg=$(flag)) export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS RUSTFLAGS +CARGO = RUST_BACKTRACE=1 cargo +CARGOFLAGS = --release # Cargo looks for config in and writes cache to $CARGO_HOME/ export CARGO_HOME = $(CURDIR)/debian/cargohome # Ask cargo to be verbose when building @@ -43,39 +45,29 @@ ifneq ($(filter pkg.cargo.mkstage0,$(DEB_BUILD_PROFILES)),) # Workaround for https://github.com/rust-lang/cargo/issues/1423 ln -s `find $(CURDIR)/deps -name 'cargo-*' -type f -executable` $(CURDIR)/cargo-stage0 else - ln -s `which cargo` $(CURDIR)/cargo-stage0 + ln -sf `which cargo` $(CURDIR)/cargo-stage0 endif + debian/scripts/prune-checksums vendor/backtrace-sys-*/ debian/scripts/prune-checksums vendor/libgit2-sys-*/ - # Configure to build cargo using the just-built stage0 - ./configure \ - --prefix=/usr \ - --disable-debug \ - --enable-optimize \ - --local-rust-root=/usr \ - --release-channel=stable \ - --cargo=$(CURDIR)/cargo-stage0 \ - --build=$(DEB_BUILD_RUST_TYPE) \ - --host=$(DEB_HOST_RUST_TYPE) \ - --target=$(DEB_TARGET_RUST_TYPE) override_dh_auto_build-arch: - RUST_BACKTRACE=1 $(MAKE) + $(CARGO) build $(CARGOFLAGS) override_dh_auto_build-indep: ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) - $(MAKE) doc + $(CARGO) doc $(CARGOFLAGS) cd target/doc/ && rm -f jquery.js && ln -s /usr/share/javascript/jquery/jquery.js endif override_dh_auto_test: - RUST_BACKTRACE=1 CFG_DISABLE_CROSS_TESTS=1 dh_auto_test + CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGOFLAGS) override_dh_auto_install: # We pick stuff directly from target/ override_dh_auto_clean: -mv $(CURDIR)/.Cargo.lock.orig $(CURDIR)/Cargo.lock - dh_auto_clean + $(CARGO) clean $(CARGOFLAGS) -$(RM) -r $(CURDIR)/target/ \ $(CURDIR)/.cargo \ $(CURDIR)/config.mk \